<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <script>
        Array.prototype.myPush = function(){
            // this[this.length] = arguments[arguments.length-1]
            for(var i=0;i<arguments.length;i++){
                this[this.length] = arguments[i]
            }
            return this.length
        }
        var arr = [1,2,3,4,5]
        var res = arr.myPush(6,99,8)
        console.log(res)
        console.log(arr)
    </script>
</body>
</html>